const TimeStamp = new Date().getTime();
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
	lintOnSave: false,
	productionSourceMap: false,
	publicPath: './',
	devServer: {
		port: 8081,
		// If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
		// proxy: {
		//   '/': {
		//     target: 'https://school.fengniaotuangou.cn',
		//     ws: true,
		//     changeOrigin: true
		//   }
		// }
	},
	configureWebpack: config => {
		config.mode = "development",
			config.plugins.push(
				new HtmlWebpackPlugin({
					title: '电动自行车监管平台',
					minify: false,
					template: path.resolve(__dirname, 'public/index.html')
				})
			),
			config.externals = {
				'TMap': 'TMap'
			}
		// config.output = { 
		//     filename: `[name].${TimeStamp}.js`,
		//     chunkFilename: `[name].${TimeStamp}.js`
		// }
	}
}
